<?php
define('IN_ECS', true);
require '../includes/init.php';
require 'php/upload.inc.php';
include_once(ROOT_PATH . '/includes/cls_ftp.php');
$uploads = new ftp_apk();

//print_r($_FILES);
$upfos = new sa_upload('Filedata1','files'); //实例化类
$upfos->upload($_POST['fileName']);//上传
if($upfos->filePath() !=''){
	$file = ROOT_PATH.'sapload/'.$upfos->filePath();
	if(!is_file($file)){
		echo 6;
	}else{
		$newfile = $uploads->uploadAPK($upfos->filePath());
		if($newfile && is_array($newfile)){
			$newfile['size'] = $upfos->getStringSize();
			echo json_encode($newfile);
		}else{
			echo 6;
		}
	}
}else{
	echo $upfos->Err();
}
?>